
{% for p in page_range %}
    <a href="?{{queries.urlencode}}&amp;page={{p}}"{% ifequal p page %} class="selected"{% endifequal %}>{{p}}</a>
{% empty %}
    <a href="?{{queries.urlencode}}&amp;page=1" class="selected">1</a>
{% endfor %}